1. Field of the Invention
The present invention relates to circuits for decoding or demodulating pulse width modulated (PWM) signals.
2. Description of the Prior Art
Pulse width modulation (PWM) is a method of encoding a sequence of numerical values by modulating the duty cycle of a fixed-frequency square-wave carrier signal. More specifically, the duty cycle of each successive period of the carrier signal is modulated so as to be proportional to the corresponding numerical value in the sequence. The information represented by the sequence of numerical values is typically either a succession of distinct measurement results or else periodic samples of a continuous waveform.
The purpose of a PWM decoder is to recover from the modulated signal the originally encoded sequence of numerical values, typically by generating an analog signal successively proportional thereto. One known PWM decoder comprises a resistor-capacitor integrator circuit. Before each successive period of the PWM signal, the integrator is initialized by discharging the integrator capacitor. During the period, a fixed current is supplied to the integrator capacitor during the time the PWM square-wave has one of its two alternating values. At the end of the period, the capacitor voltage is proportional to the duty cycle of the PWM signal during that period, and hence to the value of the encoded information. This capacitor voltage is typically stored by a sample-and-hold circuit so that the integrator can immediately thereafter be initialized to decode the next period of the PWM signal.
One disadvantage of the described prior art PWM decoder is that its output voltage is inversely proportional to the capacitance of the integrator capacitor. Since it generally is impractical to manufacture capacitors to high tolerances, such a PWM decoder generally requires expensive individual calibration to attain high accuracy. In addition, the integrator capacitor is subject to thermal drift which upsets the accuracy of such calibration.
Another disadvantage of the described prior art PWM decoder is that it requires initialization between each period of the PWM square-wave signal by discharging the integrator capacitor. However, capacitors suffer a dielectric absorption effect that prevents them from being completely discharged during the short time available before the beginning of each period. This introduces an offset error in the decoder output.